<script>
export default {
  name: "Login",
  methods:{
    login(){
      //在本地存储中设置值
      localStorage.setItem('loginStatus',1);
      //跳转到首页
      this.$router.push('/');
    }
  }
}
</script>

<template>
    <div>
      <h3>这是登录页面</h3>
      <button @click="login">登录</button>
    </div>
</template>

<style scoped>

</style>